package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {
    //保存动态
    String save(Movement movement);

    //查询个人动态
    List<Movement> findByUserId(Integer page, Integer pagesize, Long userId);

    //查询好友动态
    List<Movement> findByFriendId(Long friendId, Integer page, Integer pagesize);
    //根据动态id，分页查询数据
    List<Movement> findByIds(String[] movementIds, Integer page, Integer pagesize);
    //随机获取
    List<Movement> randomMovement(Integer pagesize);
    //根据id查询动态
    Movement findById(String movementId);

    //更新动态状态
    void updateState(String movementId, Integer state);

    //分页查询动态列表
    PageResult findAll(Integer status, Long userId, Integer page, Integer pagesize);
}
